/*********************************************************************
	Rhapsody	: 7.5.2
	Login		: dan
	Component	: Test
	Configuration 	: DefaultConfig
	Model Element	: RobotTester
//!	Generated Date	: Sat, 18, Dec 2010 
	File Path	: Test/DefaultConfig/RobotPkg/RobotTester.java
*********************************************************************/

package RobotPkg;

//## auto_generated
import com.ibm.rational.rhapsody.oxf.*;
//## auto_generated
import com.ibm.rational.rhapsody.oxf.states.*;

//----------------------------------------------------------------------------
// RobotPkg/RobotTester.java                                                                  
//----------------------------------------------------------------------------

//## package RobotPkg 


//## class RobotTester 
public class RobotTester implements RiJStateConcept {
    
    public Reactive reactive;		//## ignore 
    
    protected Display itsDisplay;		//## classInstance itsDisplay 
    
    
    //## statechart_method 
    public RiJThread getThread() {
        return reactive.getThread();
    }
    
    //## statechart_method 
    public void schedTimeout(long delay, long tmID, RiJStateReactive reactive) {
        getThread().schedTimeout(delay, tmID, reactive);
    }
    
    //## statechart_method 
    public void unschedTimeout(long tmID, RiJStateReactive reactive) {
        getThread().unschedTimeout(tmID, reactive);
    }
    
    //## statechart_method 
    public RiJEventConsumer getEventConsumer() {
        return (RiJEventConsumer)reactive;
    }
    
    //## statechart_method 
    public void gen(RiJEvent event) {
        reactive._gen(event);
    }
    
    //## statechart_method 
    public void queueEvent(RiJEvent event) {
        reactive.queueEvent(event);
    }
    
    //## statechart_method 
    public int takeEvent(RiJEvent event) {
        return reactive.takeEvent(event);
    }
    
    // Constructors
    
    //## auto_generated 
    public  RobotTester(RiJThread p_thread) {
        reactive = new Reactive(p_thread);
        initRelations(p_thread);
    }
    
    //## auto_generated 
    public Display getItsDisplay() {
        return itsDisplay;
    }
    
    //## auto_generated 
    public Display newItsDisplay(RiJThread p_thread) {
        itsDisplay = new Display(p_thread);
        return itsDisplay;
    }
    
    //## auto_generated 
    public void deleteItsDisplay() {
        itsDisplay=null;
    }
    
    //## auto_generated 
    protected void initRelations(RiJThread p_thread) {
        itsDisplay = newItsDisplay(p_thread);
    }
    
    //## auto_generated 
    public boolean startBehavior() {
        boolean done = true;
        done &= itsDisplay.startBehavior();
        done &= reactive.startBehavior();
        return done;
    }
    
    //## ignore 
    public class Reactive extends RiJStateReactive {
        
        // Default constructor 
        public Reactive() {
            this(RiJMainThread.instance());
        }
        
        
        // Constructors
        
        public  Reactive(RiJThread p_thread) {
            super(p_thread);
        }
        
    }
}
/*********************************************************************
	File Path	: Test/DefaultConfig/RobotPkg/RobotTester.java
*********************************************************************/

